// // 存放接口
import request from '@/utils/request.js'

export const userservice = ({ clientToken }) => {
  return request({
    url: `/user-service/user/imageCode/${clientToken}`,
    method: 'GET'
  })
}
// 登录接口
export const login = (data) => {
  return request({
    url: '/user-service/user/login',
    method: 'POST',
    data
  })
}
// 获取用户信息
export const UserId = (id) => {
  return request({
    url: `/user-service/user/${id}`,
    method: 'GET'
  })
}
// 工单状态列表
export const alltask = () => {
  return request({
    url: '/task-service/task/allTaskStatus',
    method: 'GET'
  })
}
// 工单搜索
export const allSearch = ({ pageIndex, pageSize, isRepair, taskCode, status }) => {
  return request({
    url: '/task-service/task/search',
    method: 'GET',
    params: {
      pageIndex: pageIndex,
      pageSize: pageSize,
      isRepair: isRepair,
      taskCode: taskCode,
      status: status
    }
  })
}
// 工单创建
export const Create = (data) => {
  return request({
    url: '/task-service/task/create',
    method: 'POST',
    data
  })
}
// 获取补货详情页面数据
export const Channe = (innerCode) => {
  console.log(innerCode)
  return request({
    url: `/vm-service/channel/channelList/${innerCode}`,
    method: 'GET'
  })
}
// 获取运营人员列表
export const operator = (innerCode) => {
  return request({
    url: `/user-service/user/operatorList/${innerCode}`,
    method: 'GET'
  })
}
// 获取所有工单类型
export const taskType = () => {
  return request({
    url: '/task-service/taskType/list',
    method: 'GET'
  })
}
export * from './node'
export * from './vm'
